package zoo;

public class Animal {
    private String id;
    private String name;
    private String species;

    // 构造方法
    public Animal(String id, String name, String species) {
        this.id = id;
        this.name = name;
        this.species = species;
    }

    // 获取动物ID
    public String getId() {
        return this.id;
    }

    // 设置动物ID
    public void setId(String id) {
        this.id = id;
    }

    // 获取动物名字
    public String getName() {
        return this.name;
    }

    // 设置动物名字
    public void setName(String name) {
        this.name = name;
    }

    // 获取动物种类
    public String getSpecies() {
        return this.species;
    }

    // 设置动物种类
    public void setSpecies(String species) {
        this.species = species;
    }

    // 重写toString方法，用于打印动物信息
    @Override
    public String toString() {
        return "Animal{id='" + this.id + "', name='" + this.name + "', species='" + this.species + "'}";
    }
}